import request from "@/utils/request";

// 管理员登录
export const managerLogin = (data: any) =>
    request({
        url: "/api/manager/login",
        method: "POST",
        data,
    });

// 管理员详情
export const managerInfo = () =>
    request({
        url: "/api/manager/userInfo",
        method: "GET",
    });

// 订单列表
export const findOrderList = (params: any) =>
    request({
        url: "/api/manager/order/list",
        method: "GET",
        params,
    });

// 订单列表
export const orderInfo = (orderNo: string) =>
    request({
        url: `/api/manager/order/info/${orderNo}`,
        method: "GET",
    });

// 打印订单 - 支持批量
export const printOrder = (data: any) =>
    request({
        url: "/api/manager/order/print",
        method: "POST",
        data,
    });

// 更新订单
export const editOrder = (data: any) =>
    request({
        url: "/api/system/order",
        method: "PUT",
        data,
    });

// 货柜列表
export const findCounterList = (params: any) =>
    request({
        url: "/api/manager/container/list",
        method: "GET",
        params,
    });

// 货柜详情
export const counterEditInfo = (id: any) =>
    request({
        url: `/api/manager/container/info/${id}`,
        method: "GET",
    });

// 打印包裹单
export const printPackage = (data: any) =>
    request({
        url: `/api/manager/print/package`,
        method: "POST",
        data,
    });
